/*产品追溯字典的映射信息：
1、卡片图标(icon)；
2、详情栅格tab请求链接(url)；
3、详情栅格tab请求data对象key值(key)
4、详情栅格tab指定参数(columns)
*/
const turoverList = ['workorderId', 'workorderNumber', 'id', 'turnoverStatusId', 'turnoverStatusValue', 'turnoverProcessStatusId', 'turnoverProcessStatusValue', 'trackDemandId', 'trackDemandValue', 'taskTypeId', 'taskTypeValue', 'number', 'turnoverStatusLabel', 'turnoverProcessStatusLabel', 'createDate', 'weekPlanName', 'productionQuantity', 'trackDemandLabel', 'planStartDate', 'planEndDate', 'practicalStartDate', 'practicalEndDate', 'currentWorkstageNames', 'taskTypeLabel', 'completeQuantity']
const workstageList = ['id', 'workstageId', 'inputQuantity', 'scrapQuantity', 'startWorkStaffId', 'taskTypeLabel', 'workstageStatusLabel', 'turnoverId', 'paramTemplateId', 'workorderId', 'workstageId', 'productBatchNumber', 'sort', 'turnoverNumber', 'workstageProcessStatusLabel', 'workstageName', 'turnoverStatusLabel', 'materialNumber', 'serialNumber', 'materialName', 'drawingNumber', 'trackDemandLabel', 'materialStatusLabel', 'productionQuantity', 'inputQuantity', 'completeQuantity', 'workorderNumber', 'planStartDate', 'planEndDate', 'inspectionTypeLabel', 'allowSkipToStartLabel', 'practicalStartDate', 'practicalEndDate', 'startWorkStaffName', 'paramTemplateName', 'workstageSummary', 'parameterRecordId']
let traceMapping = {
  // 创建
  TurnoverCreate: {
    icon: 'icon-btn_edit',
    url: 'a/turnoverbatch/turnoverBatch/list',
    key: 'id',
    columns: turoverList,
    viewSource: 4
  },
  // 下发要料
  TurnoverAssign: {
    icon: 'icon-jishuwenjianchakan',
    url: 'a/materialrequest/materialRequest/list',
    key: 'turnoverId',
    viewSource: 4
  },
  // 工序
  WorkstageFinished: {
    icon: 'icon-chilun',
    url: 'a/turnoverworkstage/turnoverWorkstage/list',
    key: 'workstageId',
    columns: workstageList,
    viewSource: 4
  },
  // 批次暂停
  TurnoverPause: {
    icon: 'icon-ai07',
    url: 'a/turnoverbatch/turnoverBatch/list',
    key: 'id',
    columns: turoverList,
    viewSource: 4
  },
  // 批次恢复
  TurnoverResume: {
    icon: 'icon-btn_recovery',
    url: 'a/turnoverbatch/turnoverBatch/list',
    key: 'id',
    columns: turoverList,
    viewSource: 4
  },
  // 问题反馈
  TurnoverFeedBack: {
    icon: 'icon-wentifankui',
    url: 'a/workstageproblemprocess/workstageProblemProcess/list',
    key: 'turnoverId',
    viewSource: 4
  },
  // 工序级拆分
  TurnoverSplit: {
    icon: 'icon-piliangchaifen',
    url: 'a/turnoverbatch/turnoverBatch/list',
    key: 'id',
    columns: turoverList,
    viewSource: 4
  },
  // 批次入库
  TurnoverStore: {
    icon: 'icon-rukuon',
    url: 'a/materialstore/materialStore/list',
    key: 'id',
    viewSource: 4
  },
  // 周转批次终止
  Terminate: {
    icon: 'icon-btn_abend',
    url: 'a/turnoverbatch/turnoverBatch/list',
    key: 'id',
    columns: turoverList,
    viewSource: 4
  },
  // 分级终止
  PartTerminate: {
    icon: 'icon-btn_frozen',
    url: 'a/turnoverbatch/turnoverBatch/list',
    key: 'id',
    columns: turoverList,
    viewSource: 4
  }
}
export default traceMapping
